# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-arm-preprocessing
pkgver=0.2.3
pkgrel=0
pkgdesc="Implementation of preprocessing techniques for association rule mining"
url="https://github.com/firefly-cpp/arm-preprocessing"
arch="noarch"
license="MIT"
depends="python3 py3-niaarm py3-pandas py3-scikit-learn py3-sport-activities-features"
makedepends="py3-gpep517 py3-poetry-core"
checkdepends="py3-pytest-xdist"
subpackages="$pkgname-doc $pkgname-pyc"
source="https://github.com/firefly-cpp/arm-preprocessing/archive/$pkgver/arm-preprocessing-$pkgver.tar.gz"
builddir="$srcdir/arm-preprocessing-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl

	install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="
ee27ec56d3a4e934e98b1bdbd07bc8523a35de049f4d1d2242ea4662d31a2618b78b850cd3529036537a956266337c5f5d1db4e3d5812bd5b54e2e06f39c4817  arm-preprocessing-0.2.3.tar.gz
"
